FrameLib  2.0
DSP processing with frames of arbitrary timing and length
FrameLib_OwnedList< T > Class Template Reference

a convenience wrapper for dealing with a vector of objects owned by pointer. More...

#include <FrameLib_Types.h>

Inheritance diagram for FrameLib_OwnedList< T >:

Public Member Functions

void add (T *object)
 

Detailed Description

template<class T>
class FrameLib_OwnedList< T >

a convenience wrapper for dealing with a vector of objects owned by pointer.

This minimal template class inherits from a std::vector of std::unique_ptr<T> objects. The owned list of objects is thus memory-managed as-per std::unique_ptr. For convenience the add() method allows a raw pointer to be added to the end of the vector (and thus ownership transferred) in a compact manner.

Member Function Documentation

◆ add()

template<class T>
void FrameLib_OwnedList< T >::add ( T *  object)
inline

Add a pointer to the list of managed pointers, transferring ownership.

Parameters
objectthe pointer to add to the owned list.

The documentation for this class was generated from the following file: